//@author A0083782W
//InternalCommand is the command that is triggered by the software or user
//not by pressing the enter key
//The difference is that UserCommand will need to analyse string to understand
//what the user want
//But internal command can be triggered directly by the relevant party and 
//there is no need to string interpretation
#pragma once
#include "CommonDataType.h"

using namespace CommonDataType;
class Operations;
enum class InternalType {
	UNCLEAR = 0,
	GET_HINT,
	CALL_EVENTS,
	DEQUEUE_EVENTS,
	START_UP,
	MARK_AS_DONE,
	MARK_AS_MISSED,
	MARK_AS_REMIND,
	MOVE_FRONT,
	MOVE_BACK,
	GET_HISTORY,
	PUSH_HISTORY,
	MOVE_TO_TAIL,
};

class InternalCommand {
private:
	pos_int _storageID;
	InternalType _myOptType;
	string _currentInput;
	void analyseInternal() const;

public:
	InternalCommand();
	void trigger_markRemind();
	void trigger_callEvents();
	void trigger_markDone();
	void trigger_markMissed();
	void trigger_hinter (con_str &userInput);
	void trigger_dequeueDueEvents();
	void trigger_startUp();
	void trigger_generateHistory();
	void trigger_moveToTail();
	void trigger_moveUp();
	void trigger_moveDown();
	void trigger_pushBack(con_str &userInput);
	InternalType getInternalType() const;
	void reset();
	string getCurrentInput() const;
	
};

#include "Operations.h"

static void giveMeToOperations (const InternalCommand *aCommand);